package pack0623;

import jdk.swing.interop.SwingInterOpUtils;

public class bird {
    String name;
    String type;
    int legs;

    bird(){
        name = "斑鸠";
        type = "小鸟";
        legs = 2;
    }
    public void fly(){
        System.out.println("唔！根本拦不住！");
    }
    public void Hunting(){
        System.out.println("小鸡哪里跑！");
    }
    public static void main(String[] args) {
        bird p = new bird();
        p.legs = 2;
        p.name = "黄鹂";
        p.type = "小鸟";
        p.fly();
        p.Hunting();
        System.out.println(p.name+":"+p.legs+"条腿");

        bird p1 = new bird();
        p1.legs = 2;
        p.type = "猛禽";
        p.name = "秃鹰";
        p.Hunting();
        System.out.println(p.type+":"+p.name+" "+p.legs+"条腿");

        bird p2 = new bird();
        System.out.println(p2.type+p2.legs+p2.name);
    }

}
